#import "UIControlBase.h"

@implementation CUIControlBase

@synthesize iId;
@synthesize iHeight;
@synthesize iWidthPt;
@synthesize iTop;
@synthesize iTopPt;
@synthesize iLeftPt;
@synthesize iFontSize;
@synthesize iFontWeight;
@synthesize iFontColor;
@synthesize iFocusFontColor;
@synthesize iBackColor;
@synthesize iBackColorAlpha;
@synthesize iFocusBackColor;
@synthesize iBorderColor;
@synthesize iFocusBorderColor;
@synthesize iHorizontal;
@synthesize iVertical;
@synthesize iBackImg;
@synthesize iVisible;
@synthesize iBusiType;
@synthesize iType;
@synthesize iText;
@synthesize iValue;
@synthesize iFatherWidth;
@synthesize iFatherHeight;
@synthesize iRequired;
@synthesize iPrompt;
@synthesize iCanSubmit;
@synthesize iAbsoluteY;
@synthesize iRegex;
@synthesize iOwnerControler;

-init
{
	self = [super init];
	if (self)
	{
		self.iRequired = NO;
		self.iCanSubmit = NO;
		self.iAbsoluteY = 0;
//		self.iText = [[NSMutableString alloc] init];
//		self.iValue = [[NSMutableString alloc] init];
	}
	return self;
}

- (void)dealloc {
	[iId release];
	[iBackImg release];
	[iBusiType release];
	[iType release];
	[iText release];
	[iValue release];
	[iPrompt release];
	[iRegex release];
    [super dealloc];
}
-(void)CaculateSize
{
}
- (void)CustomInit
{
	
}

- (void) setText:(NSString *)aText
{
	if (aText)
	{
		if (iText)
		{
			NSRange rang = NSMakeRange(0,[iText length]);
			[iText replaceCharactersInRange:rang withString:aText];
		}
		else {
			iText = [[NSMutableString alloc] initWithString:aText];
		}
	}
}

- (NSMutableString*) getText
{
	return iText;
}

- (void) setValue:(NSString *)aValue
{
	if (aValue)
	{
		if (iValue)
		{
			NSRange rang = NSMakeRange(0,[iValue length]);
			[iValue replaceCharactersInRange:rang withString:aValue];
		}
		else {
			iValue = [[NSMutableString alloc] initWithString:aValue];
		}
	}
}

- (NSMutableString*) getValue
{
	return iValue;
}

- (void) setSelDialogReturnValue:(NSArray*) aReturnValue
{
	
}

@end